﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="module.ascx.cs" Inherits="ExtraClub.Web.Controls.client_grid.module" %>
<div id="client-grid">
    <table>
        <thead>
            <tr>
                <th>
                    <%=UIText["select-item-th"]%>
                </th>
                <th>
                    <%=UIText["create-mail-th"]%>
                </th>
                <th>
                    <%=UIText["first-name-th"]%>
                </th>
                <th>
                    <%=UIText["family-name-th"]%>
                </th>
                <th>
                    <%=UIText["idnumber-th"]%>
                </th>
                <th>
                    <%=UIText["sex-th"]%>
                </th>
                <th>
                    <%=UIText["birth-date-th"]%>
                </th>
                <th>
                    <%=UIText["marrage-state-th"]%>
                </th>
               <th>
                    <%=UIText["number-of-children-th"]%>
                </th>
               <th>
                    <%=UIText["education-th"]%>
                </th>
               <th>
                    <%=UIText["mothers-family-name-th"]%>
                </th>
                <th>
                    <%=UIText["city-region-th"]%>
                </th>
                <th>
                    <%=UIText["house-number-th"]%>
                </th>
                <th>
                    <%=UIText["apartment-th"]%>
                </th>
                <th>
                    <%=UIText["zip-th"]%>
                </th>
                <th>
                    <%=UIText["cellular-phone-th"]%>
                </th>
                <th>
                    <%=UIText["home-phone-th"]%>
                </th>
                <th>
                    <%=UIText["email-th"]%>
                </th>
            </tr>
        </thead>
        <tbody>
            <%clients.ForEach(delegate(VwClientProfile item) { %>
            <tr id="row-<%=item.Id %>" <%=(clients.IndexOf(item) + 1) % 2 == 0?"class='alter-row'":"" %>" >
                <td>
                    <span class="uncheck has-layout"><%=UIText["unselect-label"]%></span>
                    <input class="select has-layout" type="radio" name="select" value="<%=item.Id %>" />
                </td>
                 <td>
                    <a type="button" href="<%=WebUtils.UrlBuilder(string.Format("cmd={0}&id={1}&form={2}", ECommand.New, item.Id, "mail_message"))%>">
                        Send Email</a>
                </td>
                <td>
                    <%=item.FirstName%>
                </td>
                <td>
                    <%=item.FamilyName%>
                </td>
               <td>
                    <%=item.IDNumber%>
                </td>
                <td>
                    <%=item.Sex%>
                </td>
                <td>
                    <%=((DateTime)item.BirthDate).ToString("dd.MM.yyyy")%>
                </td>
                <td>
                    <%=item.MarrageState%>
                </td>
                <td>
                    <%=item.NumberOfChildren%>
                </td>
                <td>
                    <%=item.Education%>
                </td>
                <td>
                    <%=item.MothersFamilyName%>
                </td>
                <td>
                    <%=item.CityRegion%>
                </td>
                <td>
                    <%=item.HouseNumber%>
                </td>
                <td>
                    <%=item.Apartment%>
                </td>
                <td>
                    <%=item.Zip%>
                </td>
                <td>
                    <%=item.CellularPhone%>
                </td>
                <td>
                    <%=item.HomePhone%>
                </td>
                <td>
                    <%=item.Email%>
                </td>
            </tr>
            <%}); %>
        </tbody>
    </table>
</div>
<!-- Form: Create Message -->
<extra:FormHolder ID="AddMailForm" FormName="mail_message" runat="server" ></extra:FormHolder>